/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.ronin.service;

import com.ronin.dao.api.IAracDao;
import com.ronin.model.Arac;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 *
 * @author esimsek
 */
@Service(value = "aracService")
@Transactional(readOnly =true, propagation = Propagation.SUPPORTS)
public class AracService implements IAracService {
    
    @Autowired
    IAracDao iAracDao;

    @Override
    public Arac getSingle(Arac arac) {
        return iAracDao.getSingle(arac);
    }

    @Override
    public Arac getSingleById(Long id) {
        return iAracDao.getSingleById(id);
    }

    @Override
    public Arac getSingleOneByNamedQuery(String namedQuery,Object... parameters) {
        return iAracDao.getSingleOneByNamedQuery(namedQuery,parameters);
    }

    @Override
    public List<Arac> getList(Arac arac) {
        return iAracDao.getList(arac);
    }

    @Override
    public List<Arac> getListByNamedQuery(String namedQuery,Object... parameters) {
        return iAracDao.getListByNamedQuery(namedQuery,parameters);
    }

    @Override
    public int getCount(Arac arac) {
        return iAracDao.getCount(arac);
    }

    @Override
    @Transactional(readOnly = false, propagation = Propagation.REQUIRED)
    public void add(Arac arac) {
        iAracDao.add(arac);
    }

    @Override
    @Transactional(readOnly = false, propagation = Propagation.REQUIRED)
    public void update(Arac arac) {
        iAracDao.update(arac);
    }

    @Override
    @Transactional(readOnly = false, propagation = Propagation.REQUIRED)
    public void delete(Arac arac) {
        iAracDao.delete(arac);
    }

}
